﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
///
namespace ZX.SYS.Library.AdiDl.PageBusiness
{
    public class Br_PageDefault:PageBase
    {
        public Br_PageDefault(object p)
        {
            this.BasePage = p;
            this.PageState = "Modify";
        }

        public Br_PageDefault(object p, string s)
        {
            this.BasePage = p;
            this.PageState = s;
        }

        protected override void Init()
        {
            base.Init();
            //base.ModifyID = "";
            //base.ViewID = "";
        }

        protected override void Main()
        {
            base.Main();

            switch (this.PageState)
            {
                case "Modify":
                    {
                        ((System.Web.UI.Page)this.BasePage).FindControl(this.ModifyID).Visible = true;
                        ((System.Web.UI.Page)this.BasePage).FindControl(this.ViewID).Visible = false;
                    }break;
                case "View":
                    {
                        ((System.Web.UI.Page)this.BasePage).FindControl(this.ModifyID).Visible = false;
                        ((System.Web.UI.Page)this.BasePage).FindControl(this.ViewID).Visible = true;
                    } break;
            }
            
        }

    }
}
